<template>
  <div class="notes_box" id="notesPoin">
    <!-- <div class="form_title" id="notesPoin">注解</div> -->
    <!-- 自定义注释 -->
    <CustomAnnotation :items="treeItems" ref="stream_customAnnotation" />
  </div>
</template>

<script>
import CustomAnnotation from "@/views/edge/CommonComponents/CustomAnnotation";
import {
  parseTreeJson,
  parseJson,
  reverseJson,
  verificationTree,
} from "@/utils/index";
export default {
  components: { CustomAnnotation },
  data() {
    return {
      treeItems: [],
    };
  },
  methods: {
    getNotes() {
      let target = {};
      target.annotationList = [];
      target.asyncAnnotation = this.asyncAnnotation; //是否async (数据源)
      target.annotationListObjects = [];
      target.treeData = this.$refs.stream_customAnnotation.items; //树形结构的原始数据,回显使用
      let items = this.$refs.stream_customAnnotation.items;
      // 是否选中
      target.distChecked = this.checked;
      //注释的树形结构转换
      target.annotationList = parseTreeJson(items);
      //注释的树形结构转换第二种格式
      target.annotationListObjects = parseJson(items);
      target.form = this.form;
      // @dist 数据整理
      return target;
    },
  },
};
</script>

<style lang='scss' scoped>
.notes_box {
  margin-top: 20px;
}
</style>